import request from '@/utils/request'

// 查询整备场火车位置信息列表
export function listStockyard_train_position(query) {
  return request({
    url: '/system/stockyard_train_position/list',
    method: 'get',
    params: query
  })
}

// 查询整备场火车位置信息详细
export function getStockyard_train_position(id) {
  return request({
    url: '/system/stockyard_train_position/' + id,
    method: 'get'
  })
}

// 新增整备场火车位置信息
export function addStockyard_train_position(data) {
  return request({
    url: '/system/stockyard_train_position',
    method: 'post',
    data: data
  })
}

// 修改整备场火车位置信息
export function updateStockyard_train_position(data) {
  return request({
    url: '/system/stockyard_train_position',
    method: 'put',
    data: data
  })
}

// 删除整备场火车位置信息
export function delStockyard_train_position(id) {
  return request({
    url: '/system/stockyard_train_position/' + id,
    method: 'delete'
  })
}

// 获取整备场火车位置信息详细信息
export function getStockyard_train_positionByDrawing(drawingId) {
  return request({
    url: '/system/stockyard_train_position/getAllByDrawing/' + drawingId,
    method: 'get'
  })
}



// 放置火车
export function enterTrain(data) {
  return request({
    url: '/system/stockyard_train_position/enterTrain',
    method: 'post',
    data: data
  })
}
// 火车离开
export function exitTrain(data) {
  return request({
    url: '/system/stockyard_train_position/exitTrain',
    method: 'post',
    data: data
  })
}
